﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AUT
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string tb = textBox1.Text;
            string cb = comboBox1.Text;

            if (tb == cb)
            {
                listBox1.Items.Add("Result is a tie");
            }
            else if (tb == "paper" && cb == "rock" ||
                     tb == "rock" && cb == "scissors" ||
                     tb == "scissors" && cb == "paper")
            {
                listBox1.Items.Add("The TextBox wins");
            }
            else
            {
                listBox1.Items.Add("The ComboBox wins");
            }    
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();   
        }
    }
}
